package com.qbccn.onlinetest.service.impl;

import com.qbccn.onlinetest.domain.OtUser;
import com.qbccn.onlinetest.domain.RbRole;
import com.qbccn.onlinetest.mapper.OtUserMapper;
import com.qbccn.onlinetest.mapper.RbRoleMapper;
import com.qbccn.onlinetest.service.UserService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author linke
 * @date 2020/7/4 2:15
 * @description
 */
@Service
public class UserServiceImpl implements UserService {

  @Autowired
  private OtUserMapper otUserMapper;
  @Autowired
  private RbRoleMapper rbRoleMapper;

  @Override
  public OtUser getUserInfo(String username) {
    return otUserMapper.get(username);
  }

  @Override
  public List<RbRole> getUserRoles(String username) {
    return rbRoleMapper.getUserRoles(username);
  }
}
